package 汽车租赁系统;

import java.util.Scanner;

public class jiaoChe extends Che {
    private String xinghao;

    public jiaoChe(String pinpai, String chepai, int zujin,String xinghao) {
        super(pinpai, chepai, zujin);
        this.xinghao=xinghao;
    }

    @Override
    public double zu(int day) {
        if (day>=150){
            return this.getZujin()*day*0.7;
        }else if (day>=30){
            return this.getZujin()*day*0.8;
        }else if (day>=7){
            return this.getZujin()*day*0.9;
        }else{
            return this.getZujin()*day;
        }

    }

    public String getXinghao() {
        return xinghao;
    }

    public void setXinghao(String xinghao) {
        this.xinghao = xinghao;
    }
}
